<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>jsp2p: it.saccosilvestri.jsp2p.protocol.Protocol Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">jsp2p
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a>  </div>
  <div class="headertitle">
<div class="title">it.saccosilvestri.jsp2p.protocol.Protocol Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="it::saccosilvestri::jsp2p::protocol::Protocol" --><div class="dynheader">
Inheritance diagram for it.saccosilvestri.jsp2p.protocol.Protocol:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol__inherit__graph.png" border="0" usemap="#it_8saccosilvestri_8jsp2p_8protocol_8_protocol_inherit__map" alt="Inheritance graph"/></div>
<map name="it_8saccosilvestri_8jsp2p_8protocol_8_protocol_inherit__map" id="it_8saccosilvestri_8jsp2p_8protocol_8_protocol_inherit__map">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html" title="it.saccosilvestri.jsp2p.protocol.AliceProtocol" alt="" coords="301,5,579,32"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html" title="it.saccosilvestri.jsp2p.protocol.BobProtocol" alt="" coords="305,56,575,83"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a41b3f8af2182ce1d95ac4622c689110c">Protocol</a> (Socket cs, KeyPair kp, X509Certificate c, PublicKey capk, String pn)  throws IOException </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Costruttore della classe base da cui derivano <a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html">AliceProtocol</a> e <a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html">BobProtocol</a>.  <a href="#a41b3f8af2182ce1d95ac4622c689110c"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a6422be451c4fbb04daf3a9095b602983">sendMyCertificate</a> ()  throws IOException, 			CertificateEncodingException </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Invia il certificato del peer.  <a href="#a6422be451c4fbb04daf3a9095b602983"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PublicKey&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a6628dda63e060c54636d853d6ddca302">receiveAndCheckCertificate</a> ()  throws CertificateException, NoSuchProviderException, 			InvalidKeyException, NoSuchAlgorithmException, SignatureException </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Riceve un certificato e ne controlla validita' e scadenza.  <a href="#a6628dda63e060c54636d853d6ddca302"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">PublicKey&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a885c549e3b4144c1e8b3bb0d625ab470">receiveAndCheckCertificateWithNameAuthentication</a> (String <a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a6dcf1366f63023a80091ab663ecd3060">peerName</a>)  throws CertificateException, NoSuchProviderException, 			InvalidKeyException, NoSuchAlgorithmException, SignatureException </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Riceve un certificato e ne controlla validita' e scadenza.  <a href="#a885c549e3b4144c1e8b3bb0d625ab470"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#aa3b2ceec3724182847671516bdcff638">send</a> (byte[] toSend)  throws IOException </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Invia un array di byte.  <a href="#aa3b2ceec3724182847671516bdcff638"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">byte[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a29c231a6d7e79cf496e3f7f20cbdcbf3">readNonce</a> ()  throws IOException </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Legge un nonce.  <a href="#a29c231a6d7e79cf496e3f7f20cbdcbf3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Key&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#ac851b36e727125969fce606dfc047f23">getPrivate</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">SecretKeySpec&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a3fe429bdbe79c9b734d578071727cdfb">sessionKey</a> (byte[] nonceA, byte[] nonceB)  throws NoSuchAlgorithmException, NoSuchProviderException </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Genera la chiave di sessione "mescolando" nonceA e nonceB.  <a href="#a3fe429bdbe79c9b734d578071727cdfb"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a6dcf1366f63023a80091ab663ecd3060">peerName</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><dl class="author"><dt><b>Author:</b></dt><dd>Sacco Cosimo &amp; Silvestri Davide </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a41b3f8af2182ce1d95ac4622c689110c"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::Protocol" ref="a41b3f8af2182ce1d95ac4622c689110c" args="(Socket cs, KeyPair kp, X509Certificate c, PublicKey capk, String pn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">it.saccosilvestri.jsp2p.protocol.Protocol.Protocol </td>
          <td>(</td>
          <td class="paramtype">Socket&#160;</td>
          <td class="paramname"><em>cs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">KeyPair&#160;</td>
          <td class="paramname"><em>kp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">X509Certificate&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">PublicKey&#160;</td>
          <td class="paramname"><em>capk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>pn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throws IOException </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Costruttore della classe base da cui derivano <a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html">AliceProtocol</a> e <a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html">BobProtocol</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">cs</td><td>socket su cui effettuare lo scambio di messaggi del protocollo. </td></tr>
    <tr><td class="paramname">kp</td><td>chiave pubblica e chiave privata del peer. </td></tr>
    <tr><td class="paramname">c</td><td>certificato del peer. </td></tr>
    <tr><td class="paramname">capk</td><td>chiave pubblica della Certification Authority. </td></tr>
    <tr><td class="paramname">pn</td><td>identificatore del peer con il quale ci si aspetta di comunicare. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ac851b36e727125969fce606dfc047f23"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::getPrivate" ref="ac851b36e727125969fce606dfc047f23" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Key it.saccosilvestri.jsp2p.protocol.Protocol.getPrivate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_ac851b36e727125969fce606dfc047f23_icgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_ac851b36e727125969fce606dfc047f23_icgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_ac851b36e727125969fce606dfc047f23_icgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_ac851b36e727125969fce606dfc047f23_icgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html#a60cbfe1906bfbd7b95a7d21cec977843" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="363,5,690,32"/><area shape="rect" id="node7" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html#af5e630fb51c6acf73adc5cd5a76017a2" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="366,56,687,83"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1securecommunication_1_1_secure_communication.html#a4007043b898d6773ed536da026adea5f" title="Il costruttore inizializza il logger ed esegue la parte di protocollo che gli compete decidendo in ba..." alt="" coords="739,31,1285,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a29c231a6d7e79cf496e3f7f20cbdcbf3"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::readNonce" ref="a29c231a6d7e79cf496e3f7f20cbdcbf3" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">byte [] it.saccosilvestri.jsp2p.protocol.Protocol.readNonce </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throws IOException <code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Legge un nonce. </p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_cgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_cgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_cgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_cgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1utility_1_1_byte_array_utility.html#a595f511cfd7faf60b35a75c1900a9e2d" title="Converte un array di byte nell&#39;intero corrispondente." alt="" coords="368,5,731,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_icgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_icgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_icgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a29c231a6d7e79cf496e3f7f20cbdcbf3_icgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html#a60cbfe1906bfbd7b95a7d21cec977843" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="369,5,695,32"/><area shape="rect" id="node7" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html#af5e630fb51c6acf73adc5cd5a76017a2" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="371,56,693,83"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1securecommunication_1_1_secure_communication.html#a4007043b898d6773ed536da026adea5f" title="Il costruttore inizializza il logger ed esegue la parte di protocollo che gli compete decidendo in ba..." alt="" coords="744,31,1291,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a6628dda63e060c54636d853d6ddca302"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::receiveAndCheckCertificate" ref="a6628dda63e060c54636d853d6ddca302" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PublicKey it.saccosilvestri.jsp2p.protocol.Protocol.receiveAndCheckCertificate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throws CertificateException, NoSuchProviderException, 			InvalidKeyException, NoSuchAlgorithmException, SignatureException <code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Riceve un certificato e ne controlla validita' e scadenza. </p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_cgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_cgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_cgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_cgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1utility_1_1_certificate_utility.html#aab387b79ca2c81278dd91c33fd4419cf" title="Controlla validita&#39; e scandenza del certificato." alt="" coords="464,5,837,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_icgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_icgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_icgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6628dda63e060c54636d853d6ddca302_icgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html#af5e630fb51c6acf73adc5cd5a76017a2" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="465,5,786,32"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1securecommunication_1_1_secure_communication.html#a4007043b898d6773ed536da026adea5f" title="Il costruttore inizializza il logger ed esegue la parte di protocollo che gli compete decidendo in ba..." alt="" coords="835,5,1381,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a885c549e3b4144c1e8b3bb0d625ab470"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::receiveAndCheckCertificateWithNameAuthentication" ref="a885c549e3b4144c1e8b3bb0d625ab470" args="(String peerName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PublicKey it.saccosilvestri.jsp2p.protocol.Protocol.receiveAndCheckCertificateWithNameAuthentication </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>peerName</em></td><td>)</td>
          <td>  throws CertificateException, NoSuchProviderException, 			InvalidKeyException, NoSuchAlgorithmException, SignatureException <code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Riceve un certificato e ne controlla validita' e scadenza. </p>
<p>Inoltre si accerta che il certificato sia stato rilasciato al peer il cui identificatore e' passato come argomento. </p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_cgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_cgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_cgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_cgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1utility_1_1_certificate_utility.html#ae9125e02718ab76b0018b216f918a001" title="Controlla validita&#39; e scandenza del certificato." alt="" coords="608,5,1125,32"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1utility_1_1_certificate_utility.html#aab387b79ca2c81278dd91c33fd4419cf" title="Controlla validita&#39; e scandenza del certificato." alt="" coords="1173,5,1547,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_icgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_icgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_icgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a885c549e3b4144c1e8b3bb0d625ab470_icgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html#a60cbfe1906bfbd7b95a7d21cec977843" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="609,5,935,32"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1securecommunication_1_1_secure_communication.html#a4007043b898d6773ed536da026adea5f" title="Il costruttore inizializza il logger ed esegue la parte di protocollo che gli compete decidendo in ba..." alt="" coords="984,5,1531,32"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa3b2ceec3724182847671516bdcff638"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::send" ref="aa3b2ceec3724182847671516bdcff638" args="(byte[] toSend)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void it.saccosilvestri.jsp2p.protocol.Protocol.send </td>
          <td>(</td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>toSend</em></td><td>)</td>
          <td>  throws IOException <code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Invia un array di byte. </p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_aa3b2ceec3724182847671516bdcff638_icgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_aa3b2ceec3724182847671516bdcff638_icgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_aa3b2ceec3724182847671516bdcff638_icgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_aa3b2ceec3724182847671516bdcff638_icgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html#a60cbfe1906bfbd7b95a7d21cec977843" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="334,5,661,32"/><area shape="rect" id="node7" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html#af5e630fb51c6acf73adc5cd5a76017a2" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="337,56,658,83"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1securecommunication_1_1_secure_communication.html#a4007043b898d6773ed536da026adea5f" title="Il costruttore inizializza il logger ed esegue la parte di protocollo che gli compete decidendo in ba..." alt="" coords="709,31,1256,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a6422be451c4fbb04daf3a9095b602983"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::sendMyCertificate" ref="a6422be451c4fbb04daf3a9095b602983" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void it.saccosilvestri.jsp2p.protocol.Protocol.sendMyCertificate </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td>  throws IOException, 			CertificateEncodingException <code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Invia il certificato del peer. </p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6422be451c4fbb04daf3a9095b602983_icgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6422be451c4fbb04daf3a9095b602983_icgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6422be451c4fbb04daf3a9095b602983_icgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a6422be451c4fbb04daf3a9095b602983_icgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html#a60cbfe1906bfbd7b95a7d21cec977843" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="411,5,738,32"/><area shape="rect" id="node7" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html#af5e630fb51c6acf73adc5cd5a76017a2" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="414,56,735,83"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1securecommunication_1_1_secure_communication.html#a4007043b898d6773ed536da026adea5f" title="Il costruttore inizializza il logger ed esegue la parte di protocollo che gli compete decidendo in ba..." alt="" coords="787,31,1333,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a3fe429bdbe79c9b734d578071727cdfb"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::sessionKey" ref="a3fe429bdbe79c9b734d578071727cdfb" args="(byte[] nonceA, byte[] nonceB)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SecretKeySpec it.saccosilvestri.jsp2p.protocol.Protocol.sessionKey </td>
          <td>(</td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>nonceA</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>nonceB</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>  throws NoSuchAlgorithmException, NoSuchProviderException <code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Genera la chiave di sessione "mescolando" nonceA e nonceB. </p>
<p>In particolare viene calcolato y = h(nonceA||nonceB), dove h e' una funzione hash (in questo caso SHA-1), e vengono quindi presi i primi 128 bit di y per generare una chiave di sessione per l'algoritmo AES. </p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a3fe429bdbe79c9b734d578071727cdfb_icgraph.png" border="0" usemap="#classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a3fe429bdbe79c9b734d578071727cdfb_icgraph" alt=""/></div>
<map name="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a3fe429bdbe79c9b734d578071727cdfb_icgraph" id="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol_a3fe429bdbe79c9b734d578071727cdfb_icgraph">
<area shape="rect" id="node3" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_alice_protocol.html#a60cbfe1906bfbd7b95a7d21cec977843" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="374,5,701,32"/><area shape="rect" id="node7" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_bob_protocol.html#af5e630fb51c6acf73adc5cd5a76017a2" title="Protocollo per lo scambio della chiave di sessione." alt="" coords="377,56,698,83"/><area shape="rect" id="node5" href="classit_1_1saccosilvestri_1_1jsp2p_1_1securecommunication_1_1_secure_communication.html#a4007043b898d6773ed536da026adea5f" title="Il costruttore inizializza il logger ed esegue la parte di protocollo che gli compete decidendo in ba..." alt="" coords="749,31,1296,57"/></map>
</div>
</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a6dcf1366f63023a80091ab663ecd3060"></a><!-- doxytag: member="it::saccosilvestri::jsp2p::protocol::Protocol::peerName" ref="a6dcf1366f63023a80091ab663ecd3060" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">String <a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html#a6dcf1366f63023a80091ab663ecd3060">it.saccosilvestri.jsp2p.protocol.Protocol.peerName</a><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>src/it/saccosilvestri/jsp2p/protocol/<a class="el" href="_protocol_8java.html">Protocol.java</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceit.html">it</a>      </li>
      <li class="navelem"><a class="el" href="namespaceit_1_1saccosilvestri.html">saccosilvestri</a>      </li>
      <li class="navelem"><a class="el" href="namespaceit_1_1saccosilvestri_1_1jsp2p.html">jsp2p</a>      </li>
      <li class="navelem"><a class="el" href="namespaceit_1_1saccosilvestri_1_1jsp2p_1_1protocol.html">protocol</a>      </li>
      <li class="navelem"><a class="el" href="classit_1_1saccosilvestri_1_1jsp2p_1_1protocol_1_1_protocol.html">Protocol</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Tue Aug 30 2011 11:01:33 for jsp2p by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
